package com.yamanyar.weebill.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.yamanyar.weebill.domain.Project;

/**
 * Services for Project. These services uses data access objects for persistence
 * operations or any kind of calculation that might be needed. Created in Jun
 * 28, 2008.
 * 
 * @author Kaan Yamanyar
 */
public interface ProjectService {

	/**
	 * Creates (Persists) the given project.
	 * 
	 * @param Project
	 */
	@Transactional
	public void createNew(Project Project);

	/**
	 * 
	 * @return All the projects in the system.
	 */
	public List<Project> findAll();

	/**
	 * Return all the projects with the given name.
	 * 
	 * @param name
	 *            name of the project.
	 * @return list of projects with the given name.
	 */
	public List<Project> findByName(String name);

	/**
	 * Load the project entity with the given id
	 * 
	 * @param id
	 * @return project for the given id
	 */
	public Project getProjectWithID(Long id);

}
